home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 5 / MacMania 5.toast / / Internet software / NewsWatcher / NW Source / Shared Code / Libraries & Misc / FinderRegistry.h < prev    next >
Text File  |  1997-01-27  |  9KB  |  332 lines

  1. /*
  2.     File:        FinderRegistry.h
  3.  
  4.     Contains:    Classes, properties and data types used by the Scriptable Finder
  5.  
  6.     Written by:    Francis Stanbach & Greg Anderson
  7.  
  8.     Copyright:    © 1991-4 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.  
  13.     To Do:
  14. */
  15.  
  16. #ifndef __FINDERREGISTRY__
  17. #define __FINDERREGISTRY__
  18. #define FinderRegistry_h
  19.  
  20. ////////////////////////////////////////
  21. // Gestalt Selector
  22. ////////////////////////////////////////
  23.  
  24. #define gestaltFinderSelector                'fndr'
  25.  
  26. #define gestaltFinderCallsAEProcess            2
  27. #define gestaltOSLCompliantFinder            3
  28.  
  29. ////////////////////////////////////////
  30. // Finder Suite
  31. ////////////////////////////////////////
  32.  
  33. //
  34. // The old Finder Event suite was 'FNDR'
  35. // The new suite is 'fndr'
  36. //
  37. #define kAEFinderSuite            'fndr'
  38.  
  39.  
  40. ////////////////////////////////////////
  41. // Finder Events
  42. ////////////////////////////////////////
  43.  
  44. #define kAECleanUp                'fclu'
  45. #define kAEEject                'ejct'
  46. #define kAEEmpty                'empt'
  47. #define kAEErase                'fera'
  48. #define kAEGestalt                'gstl'
  49. #define kAEPutAway                'ptwy'
  50. #define kAERebuildDesktopDB        'rddb'
  51. #define kAERestart                'rest'
  52. #define kAEShutDown                'shut'
  53. #define kAESnooze                'snoz'                // Go to sleep
  54. #define kAEUpdate                'fupd'
  55.  
  56. ////////////////////////////////////////
  57. // Classes
  58. ////////////////////////////////////////
  59.  
  60. #define cFinder                    cApplication        // the finder object ≈ null
  61.  
  62. #define cDisk                    'cdis'
  63. #define cFolder                    'cfol'
  64. #define cTrash                    'ctrs'
  65. #define cDesktop                'cdsk'
  66. #define cContainer                'ctnr'                // Disks, folders, trashes, desktops, suitcases
  67. #define cSharableContainer        'sctr'                // Disks and folders
  68. #define cSuitcase                'stcs'
  69. #define cFontSuitcase            'fsut'
  70. #define cAccessorySuitcase        'dsut'
  71.  
  72. #define cAliasFile                'alia'
  73.  
  74. #define cApplicationFile        'appf'
  75. #define cDocumentFile            'docf'
  76. #define cControlPanel            'ccdv'
  77. #define cDeskAccessoryFile        'dafi'
  78. #define cSoundFile                'sndf'
  79. #define cFontFile                'fntf'
  80.  
  81. #define cDemiWindow                'dwnd'                // Content space:  includes desktop window & other windows
  82. #define cContainerWindow        'cwnd'
  83. #define cInfoWindow                'iwnd'
  84. #define cSharingWindow            'swnd'
  85. #define cStatusWindow            'qwnd'                // Empty trash progress, 'copy' window
  86.  
  87. #define cPrivilege                'priv'
  88. #define cGestalt                'cgst'
  89. #define cProcess                'prcs'                // Information about a process running on this machine (like cApplication)
  90. #define cAccessoryProcess        'pcda'
  91. #define cApplicationProcess        'pcap'
  92.  
  93. #define cEntireContents            'ects'
  94.  
  95. #define cIconFamily                'ifam'
  96.  
  97. //
  98. // User and groups:
  99. //
  100. #define cUser                    'cuse'
  101. #define cGroup                    'sgrp'
  102.  
  103. ////////////////////////////////////////
  104. // Properties
  105. ////////////////////////////////////////
  106.  
  107. //
  108. // Properties of cObject:
  109. //
  110. #define pComment                'comt'
  111. #define pContainer                cContainer            // The container the object is stored in
  112. #define pCreationDate            'crtd'
  113. #define pDemiWindow                cDemiWindow
  114. #define pDisk                    cDisk                // the disk the object is stored on
  115. #define pIconBitmap                'iimg'
  116. #define pInformationWindow        cInfoWindow            // Get info window
  117. #define pStatusWindow            cStatusWindow        // Status window (copy, empty trash, rebuild desktop database)
  118. #define pIsLocked                'islk'
  119. #define pIsSelected                'issl'
  120. #define pKind                    'kind'
  121. #define pModificationDate        'modd'
  122. #define pPhysicalSize            'phys'
  123. #define pPosition                'posn'
  124. #define pSize                    pPointSize            // both are called "Size" in their respective terminologies, so they must have the same four-character code
  125. #define pWindow                    cWindow
  126.  
  127. //
  128. // Properties of cFile:
  129. //
  130. #define pCreatorType            'fcrt'
  131. #define pFileType                'fitp'
  132. #define pVersion2                'ver2'
  133.  
  134. //
  135. // Properties of cAliasFile:
  136. //
  137. #define pOriginalItem            'orig'                // Item pointed to by alias
  138.  
  139. //
  140. // Properties of cApplicationFile:
  141. //
  142. #define pAppPartition            'appt'
  143. #define pSuggestedAppPartition    'sprt'
  144. #define pMinAppPartition        'mprt'
  145.  
  146. //
  147. // Properties of cContainer:
  148. //
  149. #define pContainerWindow        cContainerWindow    // Window that contains children
  150. #define pEntireContents            cEntireContents
  151. #define pLabelIndex                'labi'
  152. #define pExpanded                'pexp'                // Same as kAEExpanded
  153. #define pExpandable                'pexa'
  154. #define pCompletelyExpanded        'pexc'
  155. #define pSharingWindow            cSharingWindow        // Sharing window
  156. #define pView                    'pvew'
  157. #define pPreviousView            'svew'                // The last listwindow (non-icon) view
  158.  
  159. #define pSharing                'shar'
  160. #define pSharingProtection        'spro'
  161. #define pExported                'sexp'
  162. #define pMounted                'smou'
  163. #define pInheritedPrivileges    'iprv'                // "Same as enclosing" checkbox
  164. #define pOwner                    'sown'
  165. #define pGroup                    cGroup
  166. #define pOwnerPrivileges        'ownr'
  167. #define pGroupPrivileges        'gppr'
  168. #define pGuestPrivileges        'gstp'
  169.  
  170. //
  171. // Properties of cDisk:
  172. //
  173. #define pCapacity                'capa'
  174. #define pEjectable                'isej'
  175. #define pFreeSpace                'frsp'
  176. #define pLocal                    'isrv'
  177. #define pIsStartup                'istd'
  178.  
  179. //
  180. // Properties of cDesktop:
  181. //
  182. #define pTrash                    'trsh'                // Can't use cTrash, and pTrash must == kTrashFolderType
  183. #define pStartupDisk            'sdsk'
  184.  
  185. //
  186. // Properties of cTrash:
  187. //
  188. #define pWarnOnEmpty            'warn'
  189.  
  190. //
  191. // Properties of cFinder / cApplication:
  192. //
  193. #define pAppleMenuItemsFolder    'amnu'                // kAppleMenuFolderType
  194. #define pControlPanelsFolder    'ctrl'                // kControlPanelFolderType
  195. #define pDesktop                'desk'                // Can't use cDesktop, and pDesktop must == kDesktopFolderType
  196. #define pExtensionsFolder        'extn'                // kExtensionFolderType
  197. #define pFileShareOn            'fshr'
  198. #define pFileShareStartingUp    'fsup'
  199. #define pFontsFolder            'ffnt'
  200.  
  201. #define pLargestFreeBlock        'mfre'
  202. #define pPreferencesFolder        'pref'                // kPreferencesFolderType
  203. #define pAboutMacintosh            'abbx'                // Open this to get 'About this Macintosh' window
  204. #define pShortcuts                'scut'                // Finder shortcuts in help menu
  205. #define pShutdownFolder            'shdf'
  206. #define pStartupItemsFolder        'strt'                // kStartupFolderType
  207. #define pSystemFolder            'macs'                // kSystemFolderType
  208. #define pTemporaryFolder        'temp'                // kTemporaryFolderType
  209. #define pTimerItemsFolder        'timf'
  210. #define pViewPreferences        'pvwp'                // Finder view preferences ("Views" control panel)
  211.  
  212. //
  213. // View preferences properties
  214. //
  215. #define pViewFont                'vfnt'
  216. #define pViewFontSize            'vfsz'
  217. #define pGridIcons                'fgrd'
  218. #define pListViewIconSize        'lvis'
  219. #define pShowComment            'scom'
  220. #define pShowDate                'sdat'
  221. #define pShowDiskInfo            'sdin'
  222. #define pShowFolderSize            'sfsz'
  223. #define pShowKind                'sknd'
  224. #define pShowLabel                'slbl'
  225. #define pShowSize                'ssiz'
  226. #define pShowVersion            'svrs'
  227. #define pStaggerIcons            'fstg'
  228.  
  229. //
  230. // Properties of cPrivilegs
  231. //
  232. #define pSeeFiles                'prvr'
  233. #define pSeeFolders                'prvs'
  234. #define pMakeChanges            'prvw'
  235.  
  236. //
  237. // Properties of cProcess
  238. //
  239. #define pApplicationFile        cApplicationFile
  240.  
  241. #define pDeskAccessoryFile        cDeskAccessoryFile
  242. #define pIsScriptable            'isab'
  243. #define pLocalAndRemoteEvents    'revt'
  244. #define pPartitionSpaceUsed        'pusd'
  245.  
  246. #define pFolder                    cFolder
  247. #define pObject                    cObject
  248. #define pSharableContainer        cSharableContainer
  249. #define pSuitcase                cSuitcase
  250. #define pFontSuitcase            cFontSuitcase
  251. #define pAccessorySuitcase        cAccessorySuitcase
  252.  
  253.  
  254. ////////////////////////////////////////
  255. // Enumerations defined by the Finder
  256. ////////////////////////////////////////
  257.  
  258. #define enumViewBy                'vwby'
  259.  
  260. #define pSmallIcon                'smic'
  261.  
  262. #define enumGestalt                'gsen'
  263.  
  264. #define    enumConflicts            'cflc'
  265. #define enumExistingItems        'exsi'
  266.  
  267. ////////////////////////////////////////
  268. // Types defined by the Finder
  269. ////////////////////////////////////////
  270.  
  271. #define typeIconFamily            cIconFamily            // An AEList of typeIconAndMask, type8BitIcon, & c.
  272. #define typeIconAndMask            'ICN#'
  273. #define type8BitIcon            'icl8'
  274. #define type4BitIcon            'icl4'
  275. #define typeSmallIconAndMask    'ics#'
  276. #define typeSmall8BitIcon        'ics8'
  277. #define typeSmall4BitIcon        'ics4'
  278.  
  279. ////////////////////////////////////////
  280. // Keywords defined by the Finder
  281. ////////////////////////////////////////
  282.  
  283. #define keyIconAndMask            'ICN#'
  284. #define key8BitIcon                'icl8'
  285. #define key4BitIcon                'icl4'
  286. #define keySmallIconAndMask        'ics#'
  287. #define keySmall8BitIcon        'ics8'
  288. #define keySmall4BitIcon        'ics4'
  289.  
  290. #define keyAEUsing                'usin'
  291. #define keyAEReplacing            'alrp'
  292.  
  293. ////////////////////////////////////////
  294. // New prepositions used by the Finder
  295. ////////////////////////////////////////
  296.  
  297. #define keyASPrepositionHas        'has '
  298. #define keyAll                    'kyal'
  299. #define keyOldFinderItems        'fsel'
  300.  
  301. ////////////////////////////////////////
  302. // New key forms used by the Finder
  303. ////////////////////////////////////////
  304.  
  305. #define formAlias                typeAlias
  306. #define formCreator                pCreator
  307.  
  308.  
  309. ////////////////////////////////////////
  310. // Finder error codes
  311. ////////////////////////////////////////
  312.  
  313. #define errFinderIsBusy                    -15260
  314. #define errFinderWindowNotOpen            -15261
  315. #define errFinderCannotPutAway            -15262
  316. #define errFinderWindowMustBeIconView    -15263        // RequireWindowInIconView
  317. #define errFinderWindowMustBeListView    -15264        // RequireWindowInListView
  318. #define errFinderCantMoveToDestination    -15265
  319. #define errFinderCantMoveSource            -15266
  320. #define errFinderCantOverwrite            -15267
  321. #define errFinderIncestuousMove            -15268        
  322. #define errFinderCantMoveToAncestor        -15269        
  323. #define errFinderCantUseTrashedItems    -15270
  324. #define errFinderItemAlreadyInDest        -15271        // Move from folder A to folder A
  325. #define errFinderUnknownUser            -15272        // Includes unknown group
  326. #define errFinderSharePointsCantInherit    -15273
  327.  
  328. #define errFinderBoundsWrong            -15278
  329. #define errAEValueOutOfRange            -15279
  330.  
  331. #endif
  332.